<?php echo $this->render('/public/header'); ?>
    <script src="https://cdn.bootcss.com/echarts/3.8.5/echarts.min.js"></script>
    <div id="main" class="cog-lg-12 col-md-12 col-sm-12">
        <div class="col-lg-5 col-md-5 col-sm-5">
            <div id="chart" style="width:100%;height:800px;display: block"></div>
        </div>
        <div class="col-lg-5 col-lg-offset-1 col-md-5 col-md-offset-1 col-sm-5 col-sm-offset-1">
            <div id="chart2" style="width:100%;height:800px;display: block"></div>
        </div>

    </div>
    <script>
        var myChart = echarts.init(document.getElementById('chart'));

        // 指定图表的配置项和数据
        var option = {
            title: {
                text: '每月订单数量'
            },
            tooltip: {},
            legend: {
                data: ['订单']
            },
            xAxis: {
                data: <?php echo \json_encode($column);?>
            },
            yAxis: {},
            series: [{
                name: '订单数',
                type: 'bar',
                data: <?php echo \json_encode($data);?>
            }]
        };
        // 使用刚指定的配置项和数据显示图表。
        myChart.setOption(option);
    </script>
    <script>
        var myChart2 = echarts.init(document.getElementById('chart2'));

        // 指定图表的配置项和数据
        var option2 = {
            title: {
                text: '订单金额'
            },
            tooltip: {},
            legend: {
                data: ['订单']
            },
            xAxis: {
                data: <?php echo \json_encode($column);?>
            },
            yAxis: {},
            series: [
                {
                    name: '客单价',
                    type: 'bar',
                    data: <?php echo \json_encode($money);?>
                },
                {
                    name: '订单最低',
                    type: 'bar',
                    data: <?php echo \json_encode($min);?>
                },
                {
                    name: '订单最高' ,
                    type: 'bar',
                    data: <?php echo \json_encode($max);?>
                }]
        };
        // 使用刚指定的配置项和数据显示图表。
        myChart2.setOption(option2);
    </script>
<?php echo $this->render('/public/footer'); ?>